Developer Documentation

QuickTime 4 API Documentation

Wired Movies and Sprites

| Previous | Chapter Contents | Chapter Top | Next |

Sprite Button Behaviors

In QuickTime 4 sprites in a sprite track may specify some simple button behaviors. These behaviors may control the sprite's image, the system cursor, and the status message displayed in a Web browser. These behaviors are a compact shortcut for a very common set of actions which result in more efficient movies.

Button behaviors may also be added to a sprite. These behaviors are intended to make the common task of creating buttons in a sprite track easy--you basically just fill in a template. Three types of behaviors are available; you choose one or more of them. The behaviors each change a type of property associated with a button and are triggered by the mouse states notOverNotPressed , overNotPressed , overPressed , and notOverPressed . The three properties changed are

Setting a property's value to -1 means don't change it.

The cursor is currently automatically set back to the default system cursor when leaving a sprite.

The sprite track handles letting one sprite act as an active button at a time.

The behaviors are prepended to the sprite's list of actions, so they may be overriden by actions if desired.

To use the behaviors, you fill in the new atoms as follows:

kSpriteAtomType
    <kSpriteBehaviorsAtomType>, 1
        <kSpriteImageBehaviorAtomType>
            [QTSpriteButtonBehaviorStruct]
        <kSpriteCursorBehaviorAtomType>
            [QTSpriteButtonBehaviorStruct]
        <kSpriteStatusStringsBehaviorAtomType>
            [QTSpriteButtonBehaviorStruct]


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |